/**
 * Created by zhanggongze
 */

import express = require("express");
import ArticleController = require("./../../controllers/ArticleController");

let router = express.Router();

class ArticleRoutes {

      private _articleController: ArticleController;

      constructor() {
            this._articleController = new ArticleController();
      }

      get routes() {

            let controller = this._articleController;

            router.post("/create", controller.create);
            router.get("/uptoken", controller.uptoken);
            router.put("/update/:_id", controller.update);
            router.post("/list", controller.retrieve);
            router.post("/listType", controller.listType);
            router.get("/findOne/:_id", controller.findById);
            router.delete("/delete/:_id", controller.delete);

            return router;
      }


}

Object.seal(ArticleRoutes);
export = ArticleRoutes;